package top.gohigh.springboot.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.gohigh.springboot.model.Permission;
import top.gohigh.springboot.service.PermService;

@RestController
@RequestMapping("/perms")
public class PermissionController extends BaseController{
    @Autowired
    PermService permService;

    @GetMapping("/add/{name}/{perm}")
    public Permission add(@PathVariable String name,@PathVariable String perm){
        return permService.add(name,perm);
    }
}
